# $Id: Makefile 7 2015-01-09 01:55:47Z robim.poa@gmail.com $
#-----------------------------------------------------------------------------
# Purpose: Yags project Makefile
# $Rev: 7 $
# $Author: robim.poa@gmail.com $
# $Date: 2015-01-09 01:55:47 +0000 (Fri, 09 Jan 2015) $

SOURCE_DIR = src
OBJ_DIR = obj

ARQUIVOS_C   = $(wildcard $(SOURCE_DIR)/*.c)
ARQUIVOS_OBJ = $(addprefix $(OBJ_DIR)/,$(notdir $(ARQUIVOS_C:.c=.o)))

all: clear compile

clear: 
	rm -f $(OBJ_DIR)/*.o

$(OBJ_DIR)/%.o: $(SOURCE_DIR)/%.c
	gcc -c $< -o $@


compile: $(ARQUIVOS_OBJ)
	gcc $^ -lm -o yags.out
